package com.hnust.dao;

import com.hnust.domain.TestList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface TestListDao {
    @Select("select paper.pap_id,test.beginTime,test.timeRange,teacher.name teacherName,test.test_name,test.test_grade,test.test_status,paper.is_sample " +
            "from paper,test,teacher " +
            "where teacher.tea_id = #{teaId} and paper.pap_id = test.topaperid and test.createByTeacher = teacher.tea_id and test.test_status = #{status} limit #{pageNum},#{pageSize} "
    )
    @ResultType(TestList.class)
    List<TestList> getTestListById(String teaId,int status,int pageNum, int pageSize);
}
